import myAxios from "@/plugins/axios";

// 获取文章分页数据
export function getArticlePageList(data) {
    return myAxios.post("/admin/article/page", data)
}

// 删除文章
export function deleteArticle(articleId) {
    console.log(articleId)
    return myAxios.delete("/admin/article/delete", {data: {articleId: articleId}})
}

// 发布文章
export function publishArticle(data) {
    return myAxios.post("/admin/article/publish", data)
}

// 获取文章详情
export function getArticleDetail(id) {
    return myAxios.post("/admin/article/details", {id})
}

// 更新文章
export function updateArticle(data) {
    return myAxios.post("/admin/article/update", data)
}